package com.aplink.generic.pojo;

import java.util.ArrayList;
import java.util.HashMap;

import android.text.TextUtils;

import com.aplink.generic.util.ResourcesHelper;

public class MainMenu {
	private String mDrawerClose;
	private String mDrawerIcon;
	private String mDrawerOpen;
	private ArrayList<MainMenuItem> mGroupItem;
	private HashMap<MainMenuItem, ArrayList<MainMenuItem>> mMainMenu;

	public MainMenu() {
		mMainMenu = new HashMap<MainMenuItem, ArrayList<MainMenuItem>>();
		mGroupItem = new ArrayList<MainMenuItem>();
	}

	public final int getDrawerCloseID() {
		if (TextUtils.isEmpty(this.mDrawerClose)) {
			return ResourcesHelper.RESOURCE_NOT_FOUND;
		}
		return ResourcesHelper.getDrawableIdByName(this.mDrawerClose);
	}

	public final int getDrawerIconID() {
		if (TextUtils.isEmpty(this.mDrawerIcon)) {
			return ResourcesHelper.RESOURCE_NOT_FOUND;
		}
		return ResourcesHelper.getDrawableIdByName(this.mDrawerClose);
	}

	public final int getDrawerOpenID() {
		if (TextUtils.isEmpty(this.mDrawerOpen)) {
			return ResourcesHelper.RESOURCE_NOT_FOUND;
		}
		return ResourcesHelper.getDrawableIdByName(this.mDrawerOpen);
	}

	public ArrayList<MainMenuItem> getGroupItem() {
		return mGroupItem;
	}

	public HashMap<MainMenuItem, ArrayList<MainMenuItem>> getMainMenu() {
		return mMainMenu;
	}

	public final void setDrawerClose(final String drawerClose) {
		this.mDrawerClose = drawerClose;
	}

	public final void setDrawerIcon(final String drawerIcon) {
		this.mDrawerIcon = drawerIcon;
	}

	public final void setDrawerOpen(final String drawerOpen) {
		this.mDrawerOpen = drawerOpen;
	}

	public void setGroupItem(final ArrayList<MainMenuItem> groupItem) {
		mGroupItem = groupItem;
	}

	public void setMainMenu(
	        final HashMap<MainMenuItem, ArrayList<MainMenuItem>> mainMenu) {
		mMainMenu = mainMenu;
	}
}
